/* Rotate position of GoCart
* Yudong Yi
* Desc: Will let GoCart Rotate acround the curve.
* 
*/
#include "StdAfx.h"
#include "AnimationRotateGoCart.h"
#include "math.h"
#define M_PI  std::atan(1.0)*4
CAnimationRotateGoCart::CAnimationRotateGoCart(void)
{
	m_time = 0;
	m_degree = 0;
}

CAnimationRotateGoCart::~CAnimationRotateGoCart(void)
{
}
void CAnimationRotateGoCart::Update(){
	m_time++;
	m_time=m_time%60;
	m_degree=m_node->GetAngle();
	if(m_time<20)
	{
		//m_node->SetAngle(m_degree);
	}
	else if(m_time<30)
	{
		m_node->SetAngle(m_degree+18);
	}
	else if(m_time<50)
	{
		//m_node->SetAngle(m_degree);
	}
	else if(m_time<60)
	{
		m_node->SetAngle(m_degree+18);
	}

}